package com.uplift.common.utils;


public class OrderHelper {
	
	private static Object lock = new Object();
	
	private static int ic = 100;
	
	public static String generateNo() {
		synchronized (lock) {
			long ms = System.currentTimeMillis();
			String msStr = String.valueOf(ms);
			if (msStr.length() < 14) {
				msStr = "0" + msStr;
			}
			String icStr = String.valueOf(ic);
			
			String orderNo = "1" + msStr + icStr;

			if (ic == 999) {
				ic = 100;
			} else {
				ic++;
			}
			return orderNo;
		}
	}
}
